package com.angel.email.configuration.builders.impl.aol;

import com.angel.common.keyValue.KeyValueResult;
import com.angel.common.keyValue.impl.KeyValueImpl;
import com.angel.common.keyValue.impl.KeyValueResultImpl;
import com.angel.email.account.AccountInformation;
import com.angel.email.configuration.builders.IncomingEmailConfigurationBuilder;
import com.angel.email.constants.EmailPropertyConstants;
import com.angel.email.provider.ProviderType;

/**
 *
 * @author William
 *
 */
public class AOLIncomingEmailConfigurationBuilder extends IncomingEmailConfigurationBuilder {

	
	public AOLIncomingEmailConfigurationBuilder(AccountInformation accountInformation){
		super(accountInformation);
	}

	public KeyValueResult buildIncomingEmailConfiguration() {
		KeyValueResult result = new KeyValueResultImpl();

		result.addKeyValue(new KeyValueImpl(EmailPropertyConstants.EMAIL_PROVIDER, ProviderType.IMAP.getProvider()));
		result.addKeyValue(new KeyValueImpl(EmailPropertyConstants.EMAIL_INCOMING_URL, "imap.aol.com"));
		result.addKeyValue(new KeyValueImpl(EmailPropertyConstants.EMAIL_INCOMING_PORT, "143"));
		/*result.addKeyValue(new KeyValueImpl(PopEmailPropertyConstants.POP3_SOCKET_FACTORY_FALLBACK, Boolean.FALSE.toString()));
		result.addKeyValue(new KeyValueImpl(PopEmailPropertyConstants.POP3_SOCKET_FACTORY_PORT, "995"));*/

		/** For incoming google email, it must enable SSL socket factory. */
		/*result.addKeyValue(new KeyValueImpl(PopEmailPropertyConstants.POP3_SOCKET_FACTORY_CLASS, "javax.net.ssl.SSLSocketFactory"));*/

		return result;
	}


}
